Static JSON

Description

If you set the Data Source type property to be Static JSON then you will be prompted to define this data using the Static JSON property.

Creating and Viewing Static JSON

This is a simple example for displaying JSON data defined inside a form view.

  1. In the UX Controls page open the Other Controls menu and click the [Form View] option to add a Form View control to the component.

    images/static.png
  2. In the control properties list click the [...] button next to the Form properties property to open the Form Builder.

    images/static2.png
  3. Open the Data Source tab and set the Datasource type property to 'Static JSON', then click the [...] button next to the Static JSON property to define the data.

    images/static3.png
  4. In the Static JSON Data dialog click the 'Sample Data' button and select 'Names'. Click OK.

    images/static4.png
  5. Go to the Form Layout pane and click the Add item button.

    images/static5.png
  6. Select Data Controls in the Category menu, select [Label] in the Control menu, then highlight all of the Fields from the JSON data using Shift + click. Then click OK.

    images/static6.png
  7. Close the Form View Builder. On the Controls page go to the Other Controls menu and click on [Button] to add a button control to the component.

    images/static7.png
  8. Highlight the button control. Scroll down its control properties list to the Javascript section, then click the [...] button next to the onClick property.

    images/static8.png
  9. Click Add New Action.

    images/static9.png
  10. Type "Form" into the "Filter list:", Highlight Form View Control Actions, and click OK.

    images/static10.png
  11. The FormView Control Actions dialog will open. Click the [...] button next to the Action name property and select Refresh from the list.

    images/static11.png
  12. For the Form View Control Id property click the dropdown and select the form view control you defined. Click OK and then 'Save' in the Edit onClick Event dialog.

    images/static12.png
  13. Go to the Live Preview pane and click on the button. The JSON data in the Form View will be displayed.

    images/static13.png